package com.example.pages;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

/**
 * Created with IntelliJ IDEA.
 * User: home
 * Date: 11/3/12
 * Time: 12:37 PM
 * To change this template use File | Settings | File Templates.
 */
public class LoginPage extends AnyPage {

    @FindBy(id = "username")
    public WebElement userNameField;

    @FindBy(name = "password")
    public WebElement passwordField;

    @FindBy(name = "submit")
    public WebElement loginButton;

    @FindBy(id = "loginform")
    public WebElement loginForm;

    public boolean isOnLoginForm() {
        return loginForm.isDisplayed();
    }

    @FindBy(xpath = "//input[@value='admin']")
    public WebElement adminUser;

    public boolean isAdminLoggedIn() {
        return adminUser.isDisplayed();

    }


}
